package cn.com.nes.site.service.project.bo;

import cn.com.nes.site.entity.bo.BaseBO;
import cn.com.nes.site.service.system.user.bo.SaveERUserBO;
import lombok.Data;
import org.springframework.beans.BeanUtils;

@Data
public class QRCodeForSaveServiceUserBO extends BaseBO {

    private String projectUuid;

    private String departmentId;

    private Integer serviceUserType;

    private Long erUserId;

    private String username;

    private String nickname;

    private String phone;

    private String sex;

    private Long qrCodeGenerateUserId;

    public SaveProjectServiceUserBO convertToSaveBO() {
        SaveProjectServiceUserBO bo = new SaveProjectServiceUserBO();
        BeanUtils.copyProperties(this, bo);
        bo.setProjectUuid(this.getProjectUuid());
        bo.setDepartmentId(this.getDepartmentId());
        bo.setServiceUserType(this.getServiceUserType());
        bo.setPhone(this.getPhone());
        return bo;
    }

    public SaveERUserBO convertToERUserBO() {
        SaveERUserBO bo = new SaveERUserBO();
        BeanUtils.copyProperties(this, bo);
        bo.setErUserId(this.getErUserId());
        bo.setUsername(this.getUsername());
        bo.setNickname(this.getNickname());
        bo.setPhone(this.getPhone());
        bo.setSex("01");
        bo.setDepartmentId(this.getDepartmentId());
        return bo;
    }
}
